#include <iostream>
#include <queue>
#include <mutex>
#include <opencv2/core.hpp>  
#include <opencv2/highgui.hpp>  
#include <opencv2/imgproc.hpp>
#include <condition_variable>
#include "AppShareMemory.h"


#define LOOP_COUNT 1000
#define QUEUE_CAPACITY 1000

//struct DataBlock {
//    cv::Mat frame;
//    std::string channel;
//};

class FrameQueue {
public:
    FrameQueue();
    ~FrameQueue();
    bool put(DataBlock *frame);
    DataBlock* get();
public:
    std::queue<DataBlock *> queue;
    std::mutex mutex;
    std::condition_variable cv;
    int nb_frame;
    const int FrameQueueSize = 64;
};